//
//  ToolKit.h
//  nncloud
//
//  Created by macfai on 2018/11/30.
//  Copyright © 2018 macfai. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ToolKit : NSObject


+(instancetype)shareInstance;

+ (NSString *)getTimeFromTimesTamp:(NSString *)timeStr;

///验证合法的手机号
//+ (BOOL)validateMobile:(NSString *)mobileNum;

//获取当前显示控制器
+ (UIViewController *)getCurrentVC;

- (NSString *)removeHTML:(NSString *)html;


#pragma mark- 字符串校验
+ (BOOL)judgeChineseWord:(NSString *)text;//纯汉字
+ (BOOL)judgePassWord:(NSString *)psd;//验证密码只支持数字、字母

//字符串长度和特殊字符检测
+ (BOOL)checkStringLength:(NSString *)str andMin:(int) min andMax:(int)max andAlertStr:(NSString *)alertStr;
+ (BOOL)checkStringSpecial:(NSString *)str andAlertStr:(NSString *)alertStr andNeedShow:(BOOL)show;

//只能输入整数和小数
+ (BOOL)validateNumberAndDot:(NSString *)text;
+ (BOOL)validateTwoDots:(NSString *)text;
+ (NSString *)mobileOperator:(NSString *)mobileNum;//获取手机的运营商
+ (BOOL)validateMobile:(NSString *)mobileNum;//验证手机号
+ (BOOL)validateMail:(NSString *)mail;
+ (BOOL)validatePassWord:(NSString *)psd;//验证密码（只支持数字、字母、下划线，字母区分大小写，不支持特殊字符）^[0-9a-zA-Z_]{1,}$
+ (BOOL)validateIdCard:(NSString *)idCard;//判断身份证格式
+ (BOOL)stringContainsEmoji:(NSString *)string;//判断是否是emoji文字
/**
 *  将阿拉伯数字转换为中文数字
 */
+(NSString *)translationArabicNum:(NSInteger)arabicNum;

@end

NS_ASSUME_NONNULL_END
